<?php
require('include/dblogin.inc.php');

try {
	DataHandler::connect(DATA_HOST, DATA_BASE, DATA_USER, DATA_PASS);

	//mysql_connect(DATA_HOST, DATA_USER, DATA_PASS);
	//mysql_select_db(DATA_BASE);

	define('DATABASE_OK', true);
}
catch (Exception $e) {
	if ($_REQUEST['sView'] != 'appconfig-setup' && $_REQUEST['sAction'] != 'appconfig-setup') {
		header('Location: index.php?sView=appconfig-setup');
		exit();
	}
	else {
		define('DATABASE_OK', false);
	}
}

?>
